package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class CheckLoginRequest extends AbstractRequest {
    private String userInfo;
    @Override
    public void requestCheck() {
        if(StringUtils.isBlank(userInfo)){
            throw new ValidateException(
                    SysRetCodeConstants.USER_INFOR_INVALID.getCode(),
                    SysRetCodeConstants.USER_INFOR_INVALID.getMessage());
        }
    }
}
